{% extends 'main.html' %}
{% load func %}

{% block title %}
    <title>asset info</title>
{% endblock %}


{% block content %}
<div class="row pad-ver">
            <div class="input-group mar-btm">
                 <input type="text" placeholder="请输入用户邮箱" class="form-control input-lg" id="search">
                 <span class="input-group-btn">
                     <button class="btn btn-primary btn-lg" type="button" onclick="search()">Search</button>
                 </span>
            </div>
    </div>

<div class="panel">
    {% for log in log_obj %}
    <div class="panel-heading">
        <h3 class="panel-title">用户：{{ log.user.email }}，时间：{{ log.date }}</h3>
    </div>
    <div class="panel-body">
        {{ log.content }}
    </div>
    {% endfor %}
        <div class="pull-right">
            <ul class="pagination text-nowrap mar-no">
                {% page log_obj 'audit_log' %}
            </ul>
        </div>
</div>
<script>
    function search(){
        var user_name=$('#search').val();
        location.href='/audit_log/?user_name='+user_name
    }
   function go(){
        var page_num=$('#go').val();
        location.href="/audit_log/?page="+page_num+'&user_name='+$('#search').val()
    }
</script>
{% endblock %}
